import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    redirect: '/pages/index/index'
  },
  {
    path: '/pages/index/index',
    name: '首页',
    component: () => import('../pages/index/index.vue')
  },
  {
    path: '/pages/result/index',
    name: '查询结果',
    component: () => import('../pages/result/index.vue')
  },
  {
    path: '/pages/order/screenshot_order',
    name: '订单',
    component: () => import('../pages/order/screenshot_order.vue')
  },
  {
    path: '/pages/order/order_detail',
    name: '订单详情',
    component: () => import('../pages/order/order_detail.vue')
  },
  {
    path: '/pages/user/index',
    name: '我的',
    component: () => import('../pages/user/index.vue')
  },
  {
    path: '/pages/payment/index',
    name: '支付',
    component: () => import('../pages/payment/index.vue')
  },
  {
    path: '/pages/cashier/index',
    name: '收银台',
    component: () => import('../pages/cashier/index.vue')
  },
  {
    path: '/pages/payment/success',
    name: '支付成功',
    component: () => import('../pages/payment/success.vue')
  },
  {
    path: '/login',
    name: '登录',
    component: () => import('../pages/login/login.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router